package com.gnerv.tools.entity.extend.test.mapper;

import com.gnerv.tools.entity.extend.test.Permission;
import com.gnerv.tools.entity.extend.test.PermissionDTO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import sun.awt.SunHints;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 基础平台-权限表 Mapper 接口
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-10-10
 */
@Mapper
public interface PermissionMapper {

    PermissionDTO selectPermission(@Param(value = "permissionId") String permissionId);

    Map<String, Object> selectPermissionMap(@Param(value = "permissionId") String permissionId);

    Permission selectPermissionById(@Param(value = "id") String id);

    Map<String, Object> mapPermission1(@Param(value = "id") String id);

    @MapKey("uk_id")
    Map<String, Permission> mapPermission2(@Param(value = "id") String id);

    @MapKey("permission")
    Map<String, List<Permission>> mapPermission3(@Param(value = "id") String id);

}
